package com.zzyl.controller.customer;

import com.zzyl.service.MyTaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author sjqn
 */
@Component
@Slf4j
public class MyTaskController {

    @Autowired
    private MyTaskService myTaskService;

    /**
     * 定时任务 每隔5秒触发一次
     */
    @Scheduled(cron = "0 1/31 * * * ?")
    public void executeTask() {

        myTaskService.executeTask();
    }
}